<!DOCTYPE html>
<html lang="cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上面3个meta标签*必须*放在最前面 -->
    <link rel="icon" href="__ROOT__/images/logo.png" type="image/png" sizes="10x30">
    <title><{$list[0]['title']}></title>

    <!-- Bootstrap -->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">

    <!--[if lt IE 9]>
      <script src="./public/js/html5shiv.min.js"></script>
      <script src="./public/js/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="__PUBLIC__/my3.css">
  </head>
  <body>
    <div id="nav"><!-- 导航条 -->
            <div class="container">
                <div class="row">
                <div id="top3">
                    <ul>
                        <li><a href="<{:U('Index/index')}>"><img src="__ROOT__/Public/images/logo.png" width="45" onerror="onerror=null;src='__PUBLIC__/Uploads/error.jpg'"></a></li>
                        <li>|</li>
                        <li><a href="<{:U('Pers/index')}>">个人中心</a></li>
                    </ul>
                </div>
                <div id="top2">
                    <ul>
                        <li><a href="<{:U('Pers/index')}>"><{$Think.session.user.name}></a></li>
                        <li><a href="<{:U('News/index')}>">消息(<{$news_count}>)</a></li>
                        <li><a href="<{:U('Index/index')}>">摆渡首页</a></li>
                    </ul>
                </div>
                </div>
            </div>
        </div>


      <div id="top"><!-- 面包屑导航 -->
          <div class="container" id="top1">
          <span>摆渡经验&nbsp;>&nbsp;</span>
              <ul>
                  <volist name="name" id="vo">
                      <li><{$vo.name}>&nbsp;>&nbsp;</li>
                  </volist>
              </ul>
          </div>
      </div>


  <div class="container">
      <div class="row">
      <!-- 左侧 -->
          <div class="col-md-8" id="box1">
              <p id="p1"><{$list[0]['title']}></p>
                <span>浏览:<span id="reader"><{$list[0]['reader']}></span>&nbsp;|&nbsp;更新:<{:date('Y-m-d H:i:s',$list[0]['create_time'])}></span>

                <div id="box2">
                    <div class="col-md-2" id="box3">
                        <p id="p2">推荐经验</p>
                    </div>
                    <div class="col-md-10" id="box4">
                        <a href=""><{$list[0]['title']}></a>
                    </div>
                </div>

                <div id="box5">
                      <p><b>简介:</b><{$list[0]['intro']}></p>
                      <empty name="list[0]['picture']">
                        
                        <else />
                            <img src="<{$list[0]['picture']}>" width="500" onerror="onerror=null;src='__PUBLIC__/Uploads/error.jpg'">
                        </empty>
                      <div id="toolraw">工具/原料</div><hr>
                      <div id="tool"><b>·工具:</b>
                          <empty name="list[0]['tool']">
                              暂无
                          <else />
                              <{$list[0]['tool']}>
                          </empty>
                      </div>
                      <div id="row"><b>·原料:</b>
                          <empty name="list[0]['raw']">
                              暂无
                          <else />
                              <{$list[0]['raw']}>
                          </empty>
                      </div>
                      <div id="step">方法/步骤</div><hr>
                      <div>
                          <{:htmlspecialchars_decode($list[0]['content'])}>
                      </div>
                </div>

                
                <!-- 声明 -->
                <div id="box7">
                    <div class="col-md-1">
                        <span class="glyphicon glyphicon-info-sign" id="sp1"></span>
                    </div>
                    <div class="col-md-11">
                        <span>经验内容仅供参考，如果您需解决具体问题(尤其法律、医学等领域)，建议您详细咨询相关领域专业人士。</span>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-11" >
                        <span id="box9">作者声明：本篇经验系本人依照真实经历原创，未经许可，谢绝转载。</span>
                    </div>
                </div>

                <!-- 评论输入框 -->
                <div class="col-md-12" id="box17">
                    <span id="p6">相关评论</span>
                </div>

                <div class="col-md-12" id="box18">
                        <div class="col-md-9"></div>
                        <div class="col-md-3">
                            <span class="glyphicon glyphicon-comment" id="p7"></span>
                            <span id="p8">评论(<{$data8}>)</span>
                        </div>
                        <div class="col-md-1"></div>
                        <div class="col-md-10" id="box19">
                            <if condition="$ps eq 1">
                                <div class="ip1">您已被禁言</div>
                            <else />
                                <form action="<{:U('content/comment',array('eid'=>$list[0]['id']))}>" method="post">
                                <textarea class="form-control" rows="3" id="text1" name="text" maxlength="100" placeholder="请输入100字以内的评论..."></textarea><br>
                                <button class="btn btn-success" id="btn1">发布评论</button>
                                </form>
                            </if>
                            
                        </div>
                </div>

                <!-- 评论内容 -->
                <div class="col-md-12" id="box20">
                    <volist name="data7" id="voli">
                    <div class="col-md-12">
                        <div class="col-md-1">
                            <div class="box21">
                                <img src="__ROOT__<{$voli.path}>" onerror="onerror=null;src='__PUBLIC__/Uploads/error.jpg'">
                            </div>
                        </div>
                        <div class="col-md-4" class="box22">
                            <span class="p9"><a href=""><{$voli.name}></a></span>
                        </div>
                        <div class="col-md-3">
                            
                        </div>
                        <div class="col-md-4">
                            <span><{$voli.time}></span>
                        </div>

                        <div class="col-md-1"></div>
                        <div class="col-md-10 box23">
                            <span><{$voli.content}></span>
                        </div>
                        <div class="col-md-1"></div>

                        <div class="col-md-9"></div>
                        <div class="col-md-3">
                            <span class="glyphicon glyphicon-comment"></span>
                            <span class="p10">回复评论</span>

                        </div>

                        <div class="col-md-1" ></div>
                            <div class="col-md-10 box24">
                                <if condition="$ps eq 1">
                                    <div class="ip1">您已被禁言</div>
                                <else />
                                <form action="<{:U('content/reply',array('coid'=>$voli['id']))}>" method="post">
                                <textarea class="form-control" rows="3" name="text" maxlength="100" placeholder="请输入100字以内的评论..."></textarea><br>
                                <button class="btn btn-success btn2">回复评论</button>
                                </form>
                                </if>
                            </div></div>
                          <div class="col-md-1" ></div>
                          </div><!-- end box20 -->
                          <div class="col-md-12">
                          <div class="col-md-1"></div>
                          <div class="col-md-9">
                              <volist name="data9" id="vli">
                                  <if condition="$voli['id'] eq $vli['coid']">
                                      <div class="p11"><i><b><{$vli.name}>:</b><{$vli.content}></i></div>
                                      <div class="time col-md-12"><{$vli.time}></div><hr>
                                  </if>
                              </volist>
                              <br>
                          <div class="line"></div>
                          </div>
                          <div class="col-md-2"></div>
                    </volist>

                </div>

          </div>
          <!-- 右侧 -->
          <div class="col-md-4" id="box10">
              <div class="col-md-12">
                  <iframe allowtransparency="true" frameborder="0" width="255" height="98" scrolling="no" src="http://tianqi.2345.com/plugin/widget/index.htm?s=2&z=3&t=1&v=0&d=1&bd=0&k=000000&f=&q=1&e=1&a=1&c=58362&w=255&h=98&align=center"></iframe>
                  <hr>
              </div>
              <div class="col-md-5">
                  <div id="touxiang">
                      <img src="__ROOT__<{$data4[0]['path']}>" onerror="onerror=null;src='__PUBLIC__/Uploads/error.jpg'">
                  </div>
              </div>
              <div class="col-md-7" id="box11">
                  <p><a href="<{:U('Pers/index',array('uid'=>$uid))}>">
                    <empty name="data4[0]['nickname']">
                        <{$data5[0]['name']}>
                    <else />
                        <{$data4[0]['nickname']}>
                    </empty></a></p>
                  <if condition="$tp eq 2">
                      <div id="guanzhu">
                          <span id="gz">已关注</span>
                      </div>
                  <else />
                    <div id="box12">
                        <span id="p5">+&nbsp;关注</span>
                    </div>
                  </if>
              </div>
              <div class="col-md-12" id="box13">
                  <span>个性签名：<{$data4[0]['signature']}></span>
              </div>
              <div class="col-md-12" id="box14">
                  <div>
                      <span>作者的经验</span>
                      <ul>
                          <volist name="data6" id="vol">
                          <li><a href="<{:U('Content/index',array('id'=>$vol['id']))}>"><{$vol.title}></a></li>
                          </volist>
                      </ul>
                  </div>
              </div>
          </div>
      </div>
  </div><!-- end container -->

  <if condition="$status eq 2">
      <div id="zan_box">
          <span><b>已顶</b></span>
      </div>
  <else />
      <div id="box15">
          <span class="glyphicon glyphicon-thumbs-up" id="good1"></span>
          <span id="good2"><{$zan_count}></span>
      </div>
      <div id="box16">
            <span>+1</span>
      </div>
  </if>

  <if condition="$type eq 1">
      <div id="collect">
          <span class="glyphicon glyphicon-star-empty" id="collect1"></span>
      </div>
      <div id="collect5">
          <span id="collect6"><b>已藏</b></span>
      </div>
  <else />
      <div id="collect7">
          <span class="glyphicon glyphicon-star-empty" id="collect8"></span>
      </div>
      <div id="collect3">
          <span id="collect4"><b>已藏</b></span>
      </div>
  </if>
  

    <!-- bshare分享 -->
    <a class="bshareDiv" href="http://www.bshare.cn/share">分享按钮</a><script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#uuid=&amp;style=3&amp;fs=4&amp;textcolor=#fff&amp;bgcolor=#9C3&amp;text=分享到"></script>
    <script src="__PUBLIC__/js/holder.min.js"></script>
    <!-- 此处引入jQuery -->
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <!-- bootstrap.min.js必须放在JQ后面 -->
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <!-- 回顶插件引用 -->
    <script src="__PUBLIC__/js/jquery.goup.min.js"></script>

    <script type="text/javascript">
        /*推荐消息js*/
        $('#box2').mouseover(function(){
            $('#box2').css('border','1px solid #5096EB');
        });
        $('#box2').mouseout(function(){
            $('#box2').css('border','1px dashed #ccc');
        });
        setInterval("classify()",3000);
        function classify(){
            $.ajax({
                type:'get',
                url:"<{:U('content/classify')}>",
                data:"cid=<{$list[0]['category_id']}>",
                dataType:'json',
                success:function(ct){
                    $('#box4 a').text(ct[0]['title']);
                    var id = ct[0]['id'];
                    $('#box4 a').attr("href",'/index.php/Home/content/index/id/'+id+'');

                }

            })
        }

        //关注
        $('#box12').mouseover(function(){
          $('#box12').css('background-color','#ccc');
        });
        $('#box12').mouseout(function(){
          $('#box12').css('background-color','');
        });
        $('#box12').click(function(){
          $('#box12').css('background-color','#ccc');
          $('#box12 span').html('已关注');
          var a = <{$uid}>;
          $.ajax({
              type:'get',
              url:"<{:U('Content/addAttention')}>",
              data:{'uid':a},
              dataType:'json',
              success:function(){

              }
          })
        });
        

        // 回顶插件调用
        $(document).ready(function () {
            $.goup({
                trigger: 500,
                bottomOffset: 50,
                locationOffset: 400,
                title: '回顶',
                titleAsText: false,
                containerColor:'#99CC33'
            });
        });

        //点赞
        $('#box15').mouseover(function(){
            $('#box15').css({'background-color':'#fff','border':'1px solid #99CC33'});
            $('#box15 span').css('color','#99CC33');
            $('#box15 #good1').css('display','none');
            $('#box15 #good2').css('display','block');
        });
        $('#box15').mouseout(function(){
            $('#box15').css({'background-color':'#99CC33','border':''});
            $('#box15 span').css('color','#fff');
            $('#box15 #good1').css('display','block');
            $('#box15 #good2').css('display','none');
        });
        $('#box15').click(function(){
            $('#box16 span').css('display','block').fadeTo(500,0);
            $('#box16').animate({marginBottom:"20px"},500);
            $.ajax({
                type:'post',
                url:"<{:U('content/good')}>",
                data:"id=<{$list[0]['id']}>&uid=<{$list[0]['uid']}>",
                dataType:'json',
                success:function(good){
                    $('#good2').html(good);
                }
            });
        });


        //控制收藏按钮轮替显示
        $('#collect').click(function(){
            $('#collect').css('display','none');
            $('#collect5').css('display','block');
            $.ajax({
                type:'post',
                url:"<{:U('content/collect')}>",
                data:"eid=<{$list[0]['id']}>",
                dataType:'json',
                success:function(){

                }
            })
        })

        $('#collect5').click(function(){
            $('#collect5').css('display','none');
            $('#collect').css('display','block');
            $.ajax({
                type:'post',
                url:"<{:U('content/collect')}>",
                data:"eid=<{$list[0]['id']}>",
                dataType:'json',
                success:function(){

                }
            })
        })

        $('#collect3').click(function(){
            $('#collect3').css('display','none');
            $('#collect7').css('display','block');
            $.ajax({
                type:'post',
                url:"<{:U('content/collect')}>",
                data:"eid=<{$list[0]['id']}>",
                dataType:'json',
                success:function(){

                }
            })
        })

        $('#collect7').click(function(){
            $('#collect7').css('display','none');
            $('#collect3').css('display','block');
            $.ajax({
                type:'post',
                url:"<{:U('content/collect')}>",
                data:"eid=<{$list[0]['id']}>",
                dataType:'json',
                success:function(){

                }
            })
        })
            




        //评论文字
        $('#p7,#p8').mouseover(function(){
            $('#p7,#p8').css('color','#99CC33');
        })
        $('#p7,#p8').mouseout(function(){
            $('#p7,#p8').css('color','');
        })

        //评论下拉
        $('#p8').click(function(){
            $('#box19').slideToggle(500);
        });

        //回复评论下拉
        $('.p10').click(function(){
            $(this).parent().next().next().slideToggle(500);
        });

        //进入页面自动执行
        $(document).ready(function(){
            //去除标签
          var a = $('#top li:last').text();
          var b = a.length-3;
          var str = a.substr(0,b);
          $('#top li:last').text(str);
          
          //添加一次浏览量
          $.ajax({
              type:'post',
              url:"<{:U('content/reader')}>",
              data:"id=<{$list[0]['id']}>",
              dataType:'json',
              success:function(data){
                  $('#reader').text(data[0]['reader']);
              }
          });
        });


    </script>
  </body>
</html>